package com.weishi.project.training.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.weishi.project.api.vo.WeekClassHourAndKilometersVo;
import com.weishi.project.api.vo.WeekDetailsVo;
import com.weishi.project.api.vo.WeekTypeCountVo;
import com.weishi.project.sport.home.vo.QueryDateVO;
import com.weishi.project.system.domain.SysUser;
import com.weishi.project.training.domain.AnnualPlan;
import com.weishi.project.training.domain.TrainingWeek;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * trainingWeekService接口
 */
public interface ITrainingWeekService extends IService<TrainingWeek> {

    /**
     * 查询trainingWeek列表
     */
    List<TrainingWeek> selectTrainingWeekList(TrainingWeek trainingWeek);

    /**
     * 获取周期集合
     * @return List<AnnualPlan>
     */
    List<AnnualPlan> getAnnualPlan();

    /**
     * 根据id查看周计划详情
     * @param id
     * @return TrainingWeek
     */
    TrainingWeek getTrainingWeekById(int id);

    /**
     * 修改周计划
     * @param trainingWeek
     */
    void updateTrainingWeek(TrainingWeek trainingWeek);

    /**
     * 查询第几周的信息
     * @param annualPlanId
     * @param id
     * @return
     */
    TrainingWeek selectTrainingWeekByWeek(Integer annualPlanId, Integer id);

    List<SysUser> getSysUerList();

    List<WeekTypeCountVo> queryWeekTypeCount(Map<String, Object> map);

    /**
     * 获取本周计划 根据weekId查询
     * @return List<WeekDetailsVo>
     */
    List<WeekDetailsVo> getWeekDetails(int weekId);

    TrainingWeek selectTrainingWeekByDay(Date date);

    List<WeekClassHourAndKilometersVo> getWeekClassHourAndKilometersVoList(Map<String, Object> params);

    void saveTrainingWeek(TrainingWeek trainingWeek);

    void removeTrainingWeek(int id);

    String synchronizeData(Integer oldWeekId, Integer weekId);


    /**
     * 运动员 -- 本周训练数据 -- 查询日期
     */
    List<QueryDateVO> getQueryDate(String day, Integer week);


    /**
     * 初始化周信息
     * @param annualPlan
     * @param annualPlanId
     */
    void saveTrainingWeek(AnnualPlan annualPlan, Integer annualPlanId);



}